gh-79940: add introspection API for asynchronous generators#11590
gh-79940: add introspection API for asynchronous generators#11590kumaraditya303 merged 6 commits intopython:mainfrom
Conversation
|
@1st1 This PR is open for some time now, is it still considered? Also, it appears that the CI/CD pipeline got stuck, the Ubuntu & Windows status is in limbo |
|
Rebased this branch onto main and adapted docs and unit tests for Python 3.11 |
37a7c35 to
cdedc91
Compare
The functions inspect.getasyncgenstate and inspect.getasyncgenlocals allow to determine the current state of asynchronous generators and mirror the introspection API for generators and coroutines.
cdedc91 to
bca9939
Compare
|
Rebased this branch onto main and adapted docs and unit tests for Python 3.12 Following additional changes:
|
|
Adapting |
kumaraditya303
left a comment
There was a problem hiding this comment.
LGTM, thanks for working on this!
|
|
|
|
Buildbot wasm32 worker seem to be unhappy, asyncio loop initialization fails now in |
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590
…rking sockets (pythonGH-102605) Skip `TestGetAsyncGenState` and restoring of the default event loop policy in `test_inspect` if platform lacks working socket support. Fixes python#11590 Automerge-Triggered-By: GH:kumaraditya303
The
inspectmodule does not contain functions for determining the current state of asynchronous generators. That is, there is no introspection API for asynchronous generators that match the API for generators and coroutines: https://docs.python.org/3.8/library/inspect.html#current-state-of-generators-and-coroutines.The functions
inspect.getasyncgenstateandinspect.getasyncgenlocalsallow to determine the current state of asynchronous generators and mirror the introspection API for generators and coroutines.https://bugs.python.org/issue35759
https://bugs.python.org/issue35759